
/*
 * Copyright (C) 2009 Archie L. Cobbs. All rights reserved.
 *
 * $Id: XMLSetField.java 137 2009-11-03 23:52:22Z archie.cobbs $
 */

package org.dellroad.sidekar.xml;

import org.dellroad.sidekar.Item;
import org.dellroad.sidekar.SetField;

/**
 * Container for a {@link SetField}'s value during the Sidekar XML import/export process.
 */
class XMLSetField<E> extends XMLCollectionField<E> {

    // Used during unmarshalling
    private XMLSetField(XMLItem xmlItem) {
        super(xmlItem);
    }

    // Used during marshalling
    public XMLSetField(Item<?> item, SetField<E> field) {
        super(item, field);
    }

    // Used during unmarshalling
    public static <E> XMLSetField<E> newInstance(Object obj) {
        return new XMLSetField<E>((XMLItem)obj);
    }
}

